package com.studykun.client.util;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.InlineHTML;

public class SimpleAvatar implements Avatar {
  private String avatarName_;
  private String avatarType_;
  
  public SimpleAvatar(
      final String name,
      final String agentType)
  {
    avatarName_ = name;
    avatarType_ = agentType;
  }
  
  public FlowPanel makeEntry() {
    final FlowPanel entry = new FlowPanel();
    final InlineHTML text = new InlineHTML(avatarName_ + ": ");
    entry.add(text);
    entry.getElement().setClassName("avatar");
    entry.getElement().setAttribute("avatar-name", avatarName_);
    entry.getElement().setAttribute("avatar-type", avatarType_);
    return entry;
  }
  
  public String avatarName() {
    return avatarName_;
  }
  
  public String avatarType() {
    return avatarType_;
  }
}
